Skip to content

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented Sep 11, 2025

Fixes #62209

@Copilot Copilot AI review requested due to automatic review settings September 11, 2025 16:35
@github-project-automation github-project-automation bot moved this to Not started in PR Backlog Sep 11, 2025
@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Sep 11, 2025
@typescript-bot
Copy link
Collaborator

Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page.

Also, please make sure @DanielRosenwasser and @RyanCavanaugh are aware of the changes, just as a heads up.

@jakebailey
Copy link
Member Author

@typescript-bot test it

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the no-default-lib TypeScript compiler directive feature. The change ensures that default TypeScript libraries are always included in compilation unless explicitly excluded through compiler options, eliminating a source of confusion where individual files could opt out of standard library inclusion.

  • Removes processing and handling of the no-default-lib directive
  • Updates test baselines to reflect that default libraries are now always included
  • Marks the hasNoDefaultLib property as deprecated in the public API

Reviewed Changes

Copilot reviewed 59 out of 62 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/baselines/reference/tsxResolveExternalModuleExportsTypes.types Updates performance stats to reflect increased type counts from including libraries
tests/baselines/reference/tsserver/configuredProjects/should-not-close-configured-project-after-closing-last-open-file,-but-should-be-closed-on-next-file-open-if-its-not-the-file-from-same-project.js Adds default library information in project output
tests/baselines/reference/tscWatch/programUpdates/when-skipLibCheck-and-skipDefaultLibCheck-changes.js Removes library-related errors that no longer occur
tests/baselines/reference/tscWatch/libraryResolution/*.js Updates library resolution order and removes duplicate lib entries
tests/baselines/reference/tsc/libraryResolution/*.js Updates shape signatures order for library files
tests/baselines/reference/tsc/incremental/ts-file-with-no-default-lib-that-augments-the-global-scope.js Adds additional library files and errors from forced inclusion
tests/baselines/reference/project/noDefaultLib/*.json Adds default library files to resolved inputs
tests/baselines/reference/noDefaultLib.* Shows library symbols now merged with user-defined interfaces
tests/baselines/reference/api/typescript.d.ts Marks hasNoDefaultLib and isLibFile properties as deprecated
tests/baselines/reference/declarationEmitPreservesHasNoDefaultLibDirective. Removes the no-default-lib directive from emitted declarations

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 11, 2025

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
test top400 ✅ Started ✅ Results
user test this ✅ Started ✅ Results
run dt ✅ Started 👀 Results
perf test this faster ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

Hey @jakebailey, the results of running the DT tests are ready.

There were interesting changes:

Branch only errors:

Package: miniprogram-wxs
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/miniprogram-wxs/miniprogram-wxs-tests.ts
   7:1  error  TypeScript@local compile error: 
Unused '@ts-expect-error' directive  @definitelytyped/expect
  10:1  error  TypeScript@local compile error: 
Unused '@ts-expect-error' directive  @definitelytyped/expect

✖ 2 problems (2 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:199:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:191:20)

You can check the log here.

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the user tests with tsc comparing main and refs/pull/62435/merge:

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Git clone failed"

Otherwise...

Everything looks good!

@jakebailey jakebailey marked this pull request as draft September 11, 2025 17:15
@typescript-bot
Copy link
Collaborator

@jakebailey
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 34 34 ~ ~ ~ p=1.000 n=6
Symbols 62,370 62,370 ~ ~ ~ p=1.000 n=6
Types 50,386 50,386 ~ ~ ~ p=1.000 n=6
Memory used 195,223k (± 0.96%) 193,999k (± 0.96%) ~ 192,746k 196,421k p=0.173 n=6
Parse Time 1.30s (± 0.58%) 1.30s (± 0.58%) ~ 1.29s 1.31s p=1.000 n=6
Bind Time 0.72s 0.72s ~ ~ ~ p=1.000 n=6
Check Time 9.73s (± 0.20%) 9.74s (± 0.38%) ~ 9.71s 9.80s p=1.000 n=6
Emit Time 2.74s (± 0.68%) 2.74s (± 0.54%) ~ 2.72s 2.76s p=0.808 n=6
Total Time 14.50s (± 0.25%) 14.51s (± 0.24%) ~ 14.47s 14.57s p=0.808 n=6
angular-1 - node (v18.15.0, x64)
Errors 1 1 ~ ~ ~ p=1.000 n=6
Symbols 948,914 948,914 ~ ~ ~ p=1.000 n=6
Types 410,884 410,884 ~ ~ ~ p=1.000 n=6
Memory used 1,245,603k (± 0.01%) 1,245,614k (± 0.00%) ~ 1,245,583k 1,245,627k p=0.689 n=6
Parse Time 6.53s (± 0.77%) 6.51s (± 0.32%) ~ 6.49s 6.55s p=1.000 n=6
Bind Time 1.87s (± 0.28%) 1.87s (± 0.59%) ~ 1.85s 1.88s p=0.784 n=6
Check Time 32.16s (± 0.40%) 32.15s (± 0.35%) ~ 32.01s 32.32s p=0.748 n=6
Emit Time 14.79s (± 0.43%) 14.87s (± 0.56%) ~ 14.81s 15.04s p=0.107 n=6
Total Time 55.36s (± 0.30%) 55.40s (± 0.36%) ~ 55.23s 55.75s p=1.000 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,542,233 2,542,233 ~ ~ ~ p=1.000 n=6
Types 902,605 902,605 ~ ~ ~ p=1.000 n=6
Memory used 2,827,015k (± 0.00%) 2,826,967k (± 0.00%) ~ 2,826,924k 2,827,029k p=0.810 n=6
Parse Time 10.49s (± 0.62%) 10.53s (± 0.69%) ~ 10.42s 10.65s p=0.325 n=6
Bind Time 2.63s (± 0.70%) 2.63s (± 0.52%) ~ 2.60s 2.64s p=0.743 n=6
Check Time 103.59s (± 1.16%) 105.38s (± 3.12%) ~ 102.26s 109.61s p=0.471 n=6
Emit Time 0.38s (± 2.88%) 0.38s (± 2.17%) ~ 0.36s 0.38s p=1.000 n=6
Total Time 117.09s (± 1.02%) 118.92s (± 2.81%) ~ 115.66s 123.17s p=0.471 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,237,019 1,237,032 +13 (+ 0.00%) ~ ~ p=0.001 n=6
Types 259,717 259,718 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,546,755k (±11.94%) 2,364,668k (± 0.03%) ~ 2,364,081k 2,366,104k p=0.093 n=6
Parse Time 5.16s (± 1.87%) 5.16s (± 0.63%) ~ 5.12s 5.21s p=0.688 n=6
Bind Time 1.77s (± 1.38%) 1.78s (± 0.97%) ~ 1.76s 1.81s p=0.291 n=6
Check Time 35.02s (± 0.86%) 35.13s (± 0.54%) ~ 34.94s 35.46s p=0.423 n=6
Emit Time 2.98s (± 1.28%) 2.99s (± 2.18%) ~ 2.91s 3.06s p=0.936 n=6
Total Time 44.95s (± 0.78%) 45.09s (± 0.57%) ~ 44.91s 45.55s p=0.468 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,237,019 1,237,032 +13 (+ 0.00%) ~ ~ p=0.001 n=6
Types 259,717 259,718 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 3,158,741k (± 0.01%) 3,158,588k (± 0.01%) ~ 3,158,001k 3,159,040k p=0.575 n=6
Parse Time 8.42s (± 0.59%) 8.41s (± 0.33%) ~ 8.38s 8.46s p=0.575 n=6
Bind Time 2.61s (± 1.04%) 2.64s (± 1.82%) ~ 2.59s 2.71s p=0.574 n=6
Check Time 52.84s (± 0.40%) 52.66s (± 0.22%) ~ 52.53s 52.82s p=0.093 n=6
Emit Time 4.35s (± 2.29%) 4.35s (± 1.67%) ~ 4.28s 4.48s p=0.810 n=6
Total Time 68.23s (± 0.24%) 68.06s (± 0.16%) ~ 67.88s 68.18s p=0.093 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 262,423 262,419 -4 (- 0.00%) ~ ~ p=0.001 n=6
Types 103,918 103,917 -1 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 440,602k (± 0.04%) 440,530k (± 0.01%) ~ 440,504k 440,575k p=0.298 n=6
Parse Time 2.90s (± 0.42%) 2.87s (± 0.68%) -0.02s (- 0.75%) 2.85s 2.90s p=0.036 n=6
Bind Time 1.11s (± 0.37%) 1.12s (± 0.49%) ~ 1.11s 1.12s p=0.282 n=6
Check Time 15.85s (± 0.51%) 15.84s (± 0.42%) ~ 15.75s 15.95s p=0.810 n=6
Emit Time 1.31s (± 1.90%) 1.32s (± 0.80%) ~ 1.30s 1.33s p=1.000 n=6
Total Time 21.17s (± 0.37%) 21.15s (± 0.31%) ~ 21.06s 21.24s p=0.687 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 72 72 ~ ~ ~ p=1.000 n=6
Symbols 225,367 225,367 ~ ~ ~ p=1.000 n=6
Types 94,290 94,290 ~ ~ ~ p=1.000 n=6
Memory used 370,073k (± 0.05%) 370,037k (± 0.03%) ~ 369,927k 370,183k p=1.000 n=6
Parse Time 2.84s (± 1.25%) 2.81s (± 0.88%) ~ 2.78s 2.85s p=0.124 n=6
Bind Time 1.61s (± 1.32%) 1.59s (± 1.40%) ~ 1.56s 1.61s p=0.223 n=6
Check Time 16.47s (± 0.45%) 16.42s (± 0.52%) ~ 16.28s 16.52s p=0.261 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.93s (± 0.50%) 20.82s (± 0.51%) ~ 20.69s 20.93s p=0.109 n=6
vscode - node (v18.15.0, x64)
Errors 1 1 ~ ~ ~ p=1.000 n=6
Symbols 3,897,295 3,897,295 ~ ~ ~ p=1.000 n=6
Types 1,227,220 1,227,220 ~ ~ ~ p=1.000 n=6
Memory used 3,716,850k (± 0.01%) 3,716,879k (± 0.01%) ~ 3,716,421k 3,717,337k p=0.936 n=6
Parse Time 18.84s (± 0.40%) 18.83s (± 0.57%) ~ 18.71s 19.02s p=1.000 n=6
Bind Time 6.07s (± 0.55%) 6.07s (± 0.36%) ~ 6.05s 6.11s p=1.000 n=6
Check Time 124.74s (± 2.43%) 126.15s (± 4.60%) ~ 122.11s 134.10s p=0.810 n=6
Emit Time 41.13s (±18.06%) 42.00s (±18.36%) ~ 37.36s 56.20s p=0.575 n=6
Total Time 190.78s (± 3.25%) 193.05s (± 5.04%) ~ 184.33s 204.80s p=0.936 n=6
webpack - node (v18.15.0, x64)
Errors 37 37 ~ ~ ~ p=1.000 n=6
Symbols 361,535 361,535 ~ ~ ~ p=1.000 n=6
Types 158,752 158,752 ~ ~ ~ p=1.000 n=6
Memory used 515,751k (± 0.02%) 515,817k (± 0.03%) ~ 515,648k 516,073k p=0.575 n=6
Parse Time 5.53s (± 0.27%) 5.52s (± 0.87%) ~ 5.44s 5.57s p=1.000 n=6
Bind Time 2.38s (± 1.61%) 2.36s (± 1.07%) ~ 2.33s 2.39s p=0.332 n=6
Check Time 27.04s (± 0.44%) 26.99s (± 0.48%) ~ 26.86s 27.22s p=0.470 n=6
Emit Time 0.00s (±154.76%) 0.00s ~ ~ ~ p=0.174 n=6
Total Time 34.95s (± 0.35%) 34.88s (± 0.39%) ~ 34.70s 35.10s p=0.423 n=6
xstate-main - node (v18.15.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 668,465 668,465 ~ ~ ~ p=1.000 n=6
Types 200,558 200,558 ~ ~ ~ p=1.000 n=6
Memory used 572,153k (± 0.03%) 572,212k (± 0.03%) ~ 572,045k 572,447k p=0.521 n=6
Parse Time 4.18s (± 0.76%) 4.16s (± 0.29%) ~ 4.14s 4.17s p=0.090 n=6
Bind Time 1.33s (± 1.38%) 1.33s (± 0.57%) ~ 1.32s 1.34s p=0.934 n=6
Check Time 20.57s (± 1.70%) 20.46s (± 1.97%) ~ 20.01s 20.87s p=0.810 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 26.07s (± 1.46%) 25.94s (± 1.53%) ~ 25.50s 26.35s p=0.575 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the top 400 repos with tsc comparing main and refs/pull/62435/merge:

Everything looks good!

@jakebailey
Copy link
Member Author

This PR fails in CI but passes locally. I have no idea what's going on with that.

@sheetalkamat
Copy link
Member

Try printing diff on failing baseline and see what it is?

@jakebailey
Copy link
Member Author

Oh, I just have to merge main. I'm touching new tests.

@jakebailey
Copy link
Member Author

@typescript-bot user test this
@typescript-bot run dt
@typescript-bot test top800

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 12, 2025

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
user test this ✅ Started ✅ Results
run dt ✅ Started 👀 Results
test top800 ✅ Started ✅ Results

@typescript-bot
Copy link
Collaborator

Hey @jakebailey, the results of running the DT tests are ready.

There were interesting changes:

Branch only errors:

Package: miniprogram-wxs
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/miniprogram-wxs/miniprogram-wxs-tests.ts
   7:1  error  TypeScript@local compile error: 
Unused '@ts-expect-error' directive  @definitelytyped/expect
  10:1  error  TypeScript@local compile error: 
Unused '@ts-expect-error' directive  @definitelytyped/expect

✖ 2 problems (2 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:199:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:191:20)

You can check the log here.

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the user tests with tsc comparing main and refs/pull/62435/merge:

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Git clone failed"

Otherwise...

Everything looks good!

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the top 800 repos with tsc comparing main and refs/pull/62435/merge:

Everything looks good!

@jakebailey jakebailey marked this pull request as ready for review September 12, 2025 21:17
@jakebailey
Copy link
Member Author

This is basically impossible to review, so I tried to split the PR into two commits.

@jakebailey jakebailey added the Breaking Change Would introduce errors in existing code label Sep 12, 2025
@sheetalkamat
Copy link
Member

sheetalkamat commented Sep 15, 2025

Its very difficult to add comment at right place so just writing at a comment here

If we can add "defaultLibName" as well into the libFiles path, then isDefaultLibrary becomes just check to see if path is in "LibFiles" set. (Check corsa)

@jakebailey
Copy link
Member Author

Which isDefaultLibrary you referring to? The testing one? I was under the impression that we had to call it in places without a Program available, but maybe you mean another function?

@sheetalkamat
Copy link
Member

u mean another function?

isSourceFileDefaultLibrary in program.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team Breaking Change Would introduce errors in existing code For Milestone Bug PRs that fix a bug with a specific milestone
Projects
Status: Not started
Development

Successfully merging this pull request may close these issues.

Remove support for /// <reference no-default-lib />
3 participants